package com.diandi.signature.properties;


import com.diandi.signature.enums.platfrom.MerchantNo;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "",locations = "classpath:signature.properties")
public class SignatureProperties {

	public String getPayPrivateSign() {
		return payPrivateSign;
	}

	public void setPayPrivateSign(String payPrivateSign) {
		this.payPrivateSign = payPrivateSign;
	}

	public String getPayPublicSign() {
		return payPublicSign;
	}

	public void setPayPublicSign(String payPublicSign) {
		this.payPublicSign = payPublicSign;
	}

	private String payLcPrivateSign;


	private String payLcPublicSign;


	private String payMjPrivateSign;


	private String payMjPublicSign;


	private String paySignType;


	private String charset;


	private String notifyUrl;

	/**
	 * 获取业务平台私钥
	 */
	private String payPrivateSign;
	/**
	 * 获取业务平台公钥
	 */
	private String payPublicSign;

	public String getPayPrivateSign(String merchantNo) {
		if(MerchantNo.理财.getNumber().equals(merchantNo)){
			return this.getPayLcPrivateSign();
		}
		if(MerchantNo.秒借.getNumber().equals(merchantNo)){
			return this.getPayMjPrivateSign();
		}
		return null;
	}

	public String getPayPublicSign(String merchantNo) {
		if(MerchantNo.理财.getNumber().equals(merchantNo)){
			return this.getPayLcPublicSign();
		}
		if(MerchantNo.秒借.getNumber().equals(merchantNo)){
			return this.getPayMjPublicSign();
		}
		return null;
	}

	public String getCharset() {
		return charset;
	}

	public void setCharset(String charset) {
		this.charset = charset;
	}

	public String getPayLcPrivateSign() {
		return payLcPrivateSign;
	}

	public void setPayLcPrivateSign(String payLcPrivateSign) {
		this.payLcPrivateSign = payLcPrivateSign;
	}

	public String getPayLcPublicSign() {
		return payLcPublicSign;
	}

	public void setPayLcPublicSign(String payLcPublicSign) {
		this.payLcPublicSign = payLcPublicSign;
	}

	public String getPayMjPrivateSign() {
		return payMjPrivateSign;
	}

	public void setPayMjPrivateSign(String payMjPrivateSign) {
		this.payMjPrivateSign = payMjPrivateSign;
	}

	public String getPayMjPublicSign() {
		return payMjPublicSign;
	}

	public void setPayMjPublicSign(String payMjPublicSign) {
		this.payMjPublicSign = payMjPublicSign;
	}

	public String getPaySignType() {
		return paySignType;
	}

	public void setPaySignType(String paySignType) {
		this.paySignType = paySignType;
	}

	public String getNotifyUrl() {
		return notifyUrl;
	}

	public void setNotifyUrl(String notifyUrl) {
		this.notifyUrl = notifyUrl;
	}
}
